xen/common: grant-table: only call IOMMU if paging mode translate is disabled
authorJulien Grall <julien.grall@linaro.org>
Tue, 22 Apr 2014 13:14:19 +0000 (14:14 +0100)
committerIan Campbell <ian.campbell@citrix.com>
Fri, 2 May 2014 12:14:10 +0000 (13:14 +0100)
commite5a6f60206f58a35601b2bada6ec4fedf5d2ace7
treebd43aeec31f55b5a672f4fc97f4a68d2e9bf853a
parentc93e9e412440e1acaace9a4c2ec2c3c2a55ba0af
xen/common: grant-table: only call IOMMU if paging mode translate is disabled

From Xen point of view, ARM guests are PV guest with paging auto translate
enabled.

When IOMMU support will be added for ARM, mapping grant ref will always crash
Xen due to the BUG_ON in __gnttab_map_grant_ref.

On x86:
    - PV guests always have paging mode translate disabled
    - PVH and HVM guests have always paging mode translate enabled

It means that we can safely replace the check that the domain is a PV guests
by checking if the guest has paging mode translate enabled.

Signed-off-by: Julien Grall <julien.grall@linaro.org>
Reviewed-by: Jan Beulich <jbeulich@suse.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
Cc: Keir Fraser <keir@xen.org>
xen/common/grant_table.c